﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="sectorform.aspx.cs" Inherits="KPIReport.Web.Forms.Authentication.sectorform" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Sector Confirmation Form</title>

    <link  type="text/css" href="<%= ResolveUrl("~/styles/layout.css") %>" rel="stylesheet" />
            
    <script src="<%= ResolveUrl("~/scripts/helper.js") %>" type="text/javascript"></script>

    <script type="text/javascript">

        $('#save').click(function () {

            var pscblock = $("#ddlSubSector option:selected").val();

            if (pscblock == '-1') { alert('Silahkan pilih jenis usaha'); return false; }
            var pscblocks = pscblock.split('|');

            var param = 'operator=' + pscblocks[0] + '&block=' + pscblocks[1];

            $.ajax({
                type: 'POST',
                url: '<%= ResolveUrl("~/ajaxhandler/loaddata/setoperator.ashx") %>?' + param,
                contentType: 'application/json',
                dataType: 'json',
                success: function (data) {

                    window.location = data.DefaultUrl;
                },
                error: function () {
                    alert('Error!');
                }
            });
        });
         
    </script>


</head>
<body>
    <form id="form1" runat="server">

    <table border="0">
    <tr>
        <td style="width:50">Jenis Usaha</td>
        <td>:</td>
        <td width="100">
            <asp:dropdownlist ID="ddlSubSector" runat="server"></asp:dropdownlist>
        </td>            
    </tr>
    <tr>
        <td></td>
        <td></td>
        <td>  			
			<div style="text-align:right;padding-top:10px;">						    
			    <a href="#" id="save" class="dialog_link ui-state-default ui-corner-all" alt="Select"><span class="ui-icon ui-icon-check"></span>Select</a>
			</div>
        </td>
    </tr>    
    </table>
    
    </form>
</body>
</html>
